function insertSort(arr = []){
    let {length} = arr;
    for(let i = 1 ; i < length; i++){//趟数
        let j = i;
        let temp = arr[i];//存储第二个 三四......
        while(j>0 && arr[j-1] > temp){
            arr[j] = arr[j-1];
            j--;
        }
        arr[j] = temp;
    } 
    console.log(arr)
}
insertSort([5,9,7,3,1,6])
